package com.cqcet.wenchuang.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户
 */
@Data
@ApiModel(value = "用户实体")
public class User implements Serializable {
    //序列化的版本号
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty("头像")
    private String icon;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "手机号")
    private String phone;

    //性别：1男，2女
    @ApiModelProperty(value = "性别:1男,2女")
    private String sex;

    //状态：0禁用，1正常
    @ApiModelProperty(value = "状态:0禁用,1正常")
    private Integer status;

    @TableField(value = "3")
    @ApiModelProperty(value = "身份标识:1商家,2管理员,3用户")
    private Integer type;

    //逻辑删除，0删除
    @TableLogic(value = "1", delval = "0")
    @ApiModelProperty(value = "逻辑删除标识:0删除,1未删除")
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
}
